<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery.data(element,[key],[value])</title>
<link type="text/css" rel="stylesheet" href="style/style.css" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/style/style.css"  />
</head>
<body id="split">
<div id="content">
  
  <div rel="jQuery.data">
    <h2><span>返回值:jQuery</span>jQuery.data(element,[key],[value])</h2>
    <h3>概述</h3>
    <div class="desc">
      <p>在元素上存放数据,返回jQuery对象。</p>
      <div class="longdesc">
        <p>注意：这是一个底层方法。你应当使用.data()来代替。</p>
      </div>
    </div>
    <h3>参数</h3>
    <div>
      <h4><strong>element,key,value</strong><span>String,String,Any</span><em>V1.2.3</em></h4>
      <p><strong>element</strong>:要关联数据的DOM对象</p>
      <p><strong>key</strong>:存储的数据名</p>
      <p><strong>value</strong>:将要存储的任意数据</p>
      <h4><strong>element,key</strong><span>String,String</span><em>V1.2.3</em></h4>
      <p><strong>element</strong>:要查询数据的DOM对象</p>
      <p><strong>key</strong>:存储的数据名</p>
<h4><strong>element</strong><span>String</span><em>V1.4</em></h4>
      <p>要查询数据的DOM对象</p>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
      <h5>jQuery 代码:</h5>
      <pre><code>jQuery.data(document.body, 'foo', 52);
jQuery.data(document.body, 'bar', 'test');</code></pre>
    </div>
  </div>
</div>
</body>
</html>
<div style="display:none">

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F327b016d332d3a7e4043796cab725707' type='text/javascript'%3E%3C/script%3E"));
</script>
</div>